/*
  LinPVR - Linux Personal Video Recorder
  Copyright (C) 2006 Kamil Pawlowski <kamilpe@gmail.com>

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/
#ifndef _OGG_ENC_H_
#define _OGG_ENC_H_

#include <theora/theora.h>
#include <stdio.h>
#include <ogg/ogg.h>
#include "capture.h"

typedef struct ogg_enc_s {
  /* common */
  FILE             *ogg_file;

  /* theora */
  yuv_buffer        yuv;
  theora_info       t_info;
  theora_comment    t_comment;
  theora_state      t_state; 
  ogg_stream_state  t_ogg_stream; 
} ogg_enc_t;

void ogg_enc_init(ogg_enc_t *ogg_enc, capture_t *capture);
int  ogg_enc_open(ogg_enc_t *ogg_enc, const char *path);
void ogg_enc_close(ogg_enc_t *ogg_enc);

#endif
